package com.zhiyizhen.handheld.common;

import android.text.TextUtils;

import com.zhiyizhen.handheld.common.constant.ResponseCode;
import com.zhiyizhen.handheld.net.ResponseException;
import com.zhiyizhen.handheld.net.exception.BaseResponseInterceptor;

public class ResponseInterceptor extends BaseResponseInterceptor {

    @Override
    public void onResponseError(ResponseException exception) {

        // 重新登录
        if (TextUtils.equals(exception.getCode(), ResponseCode.RELOGIN)) {
            AppUtil.relogin();
        }

    }
}
